package org.example.demo10;

/**
 * @author Gong.Yang
 */
public class Factory<D> {
    private final Repository<D> repository;

    public Factory(Repository<D> repository, Class<D> clazz) {
        this.repository = repository;
    }

    public Object intercept(Object[] args) {
        D arg = (D) args[0];
        return repository.log(arg);
    }
}
